/**
 * Copyright (c) 2002-2011 旭鸣信息
 * All rights reserved. 
 * File：GoodsGroupService.java
 * History:
 *       Apr 16, 2012: Initially created, liuzhi.
 */
package com.xteam.ecsystem.service.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xteam.ecsystem.dao.IGoodsGroupAttrDao;

/**
 * 商品分类属性业务管理层
 * @author liuzhi
 *
 */
@Service
public class GoodsGroupAttrService {
	
	@Autowired
	private IGoodsGroupAttrDao ggAttrDao;
	
	/**
	 * 
	 * 新增或者修改商品分类属性信息
	 * @author liuzhi
	 * @param bgaGgroup
	 * @param bgaGtype
	 * @param bgaTattri
	 * @param gBgtId
	 */
	public void saveOrUpdateObject(String bgaGgroup, String bgaGtype,
			String bgaTattri, String gBggId){
		this.ggAttrDao.saveOrUpdateObject(bgaGgroup, bgaGtype, bgaTattri, gBggId);
	}
	
	/**
	 * 根据商品分类编号获得对应的商品分类属性信息
	 * 以加载默认配置的分类属性
	 * @author liuzhi
	 * @param bgaGgroup
	 * @return
	 */
	public String getBggAttrByBgaGgroup(String bgaGgroup){
		return this.ggAttrDao.getBggAttrByBgaGgroup(bgaGgroup);
	}
	 
}
